package com.sangdy.delegate;

import java.util.HashMap;
import java.util.Map;

public class Leader implements ITarget {

	private Map<String, ITarget> targets = new HashMap<String, ITarget>();

	public Leader() {
		targets.put("登录", new TargetA());
		targets.put("首页", new TargetB());
	}

	public void doing(String command) {
		targets.get(command).doing(command);
	}

}
